Server Watch Plugin SDK Date: 6 Feb 2004
Release: 1.0
Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

SWHandle.h

Go to the documentation of this file.
00001 /* 00002 SWHandle.h 00003 Copyright 1997-2000, Deep Fried Software. All rights reserved 00004 */ 00005 00006 #if !defined(AFX_SWHANDLE_H__BD650303_DA57_11D3_89EF_0040333C2E7E__INCLUDED_) 00007 #define AFX_SWHANDLE_H__BD650303_DA57_11D3_89EF_0040333C2E7E__INCLUDED_ 00008 00009 #if _MSC_VER > 1000 00010 #pragma once 00011 #endif // _MSC_VER > 1000 00012 00013 #ifdef SWSERVICES_EXPORTS 00014 #define SWSERVICES_API __declspec(dllexport) 00015 #else 00016 #define SWSERVICES_API __declspec(dllimport) 00017 #endif 00018 00019 #define SWHANDLE_LENGTH 40 00020 00021 #include "stdafx.h" 00022 #include <string> 00023 00040 class SWSERVICES_API SWHandle 00041 { 00042 #pragma warning( push ) 00043 #pragma warning( disable : 4251 ) 00044 00045 public: 00055 SWHandle(); 00059 SWHandle( const wchar_t *foo ); 00063 SWHandle( const char *foo ); 00067 SWHandle( const SWHandle &toCopy); 00069 virtual ~SWHandle(); 00071 00078 SWHandle operator=(const CAtlString &foo); 00079 00081 SWHandle operator=(const std::wstring &foo); 00082 00084 SWHandle operator=(const wchar_t *foo); 00085 00087 SWHandle operator=(const char *foo); 00088 00090 SWHandle operator=(const SWHandle &foo); 00092 00099 operator const char*() const; 00101 const char* toCharString() const; 00103 00104 friend SWSERVICES_API bool operator==(const SWHandle &s1, const SWHandle &toCompare); 00105 friend SWSERVICES_API bool operator==(const SWHandle &s1, const CAtlString &toCompare); 00106 friend SWSERVICES_API bool operator==(const SWHandle &s1, const std::wstring &toCompare); 00107 friend SWSERVICES_API bool operator==(const SWHandle &s1, const wchar_t *foo); 00108 friend SWSERVICES_API bool operator==(const SWHandle &s1, const char *foo); 00109 friend SWSERVICES_API bool operator!=(const SWHandle &s1, const SWHandle &toCompare); 00110 friend SWSERVICES_API bool operator!=(const SWHandle &s1, const CAtlString &toCompare); 00111 friend SWSERVICES_API bool operator!=(const SWHandle &s1, const std::wstring &toCompare); 00112 friend SWSERVICES_API bool operator!=(const SWHandle &s1, const wchar_t *foo); 00113 friend SWSERVICES_API bool operator!=(const SWHandle &s1, const char *foo); 00114 friend SWSERVICES_API bool operator<(const SWHandle &s1, const SWHandle &toCompare); 00115 friend SWSERVICES_API bool operator<(const SWHandle &s1, const CAtlString &toCompare); 00116 friend SWSERVICES_API bool operator<(const SWHandle &s1, const std::wstring &toCompare); 00117 friend SWSERVICES_API bool operator<(const SWHandle &s1, const wchar_t *foo); 00118 friend SWSERVICES_API bool operator<(const SWHandle &s1, const char *foo); 00119 friend SWSERVICES_API bool operator<=(const SWHandle &s1, const SWHandle &toCompare); 00120 friend SWSERVICES_API bool operator<=(const SWHandle &s1, const CAtlString &toCompare); 00121 friend SWSERVICES_API bool operator<=(const SWHandle &s1, const std::wstring &toCompare); 00122 friend SWSERVICES_API bool operator<=(const SWHandle &s1, const wchar_t *foo); 00123 friend SWSERVICES_API bool operator<=(const SWHandle &s1, const char *foo); 00124 friend SWSERVICES_API bool operator>(const SWHandle &s1, const SWHandle &toCompare); 00125 friend SWSERVICES_API bool operator>(const SWHandle &s1, const CAtlString &toCompare); 00126 friend SWSERVICES_API bool operator>(const SWHandle &s1, const std::wstring &toCompare); 00127 friend SWSERVICES_API bool operator>(const SWHandle &s1, const wchar_t *foo); 00128 friend SWSERVICES_API bool operator>(const SWHandle &s1, const char *foo); 00129 friend SWSERVICES_API bool operator>=(const SWHandle &s1, const SWHandle &toCompare); 00130 friend SWSERVICES_API bool operator>=(const SWHandle &s1, const CAtlString &toCompare); 00131 friend SWSERVICES_API bool operator>=(const SWHandle &s1, const std::wstring &toCompare); 00132 friend SWSERVICES_API bool operator>=(const SWHandle &s1, const wchar_t *foo); 00133 friend SWSERVICES_API bool operator>=(const SWHandle &s1, const char *foo); 00134 00135 friend SWSERVICES_API std::ostream& operator<< ( std::ostream& os, SWHandle& handle ); 00136 friend SWSERVICES_API std::stringstream& operator<< ( std::stringstream& os, SWHandle& handle ); 00137 friend SWSERVICES_API std::wstringstream& operator<< ( std::wstringstream& os, SWHandle& handle ); 00138 00139 private: 00140 char m_szData[SWHANDLE_LENGTH]; 00141 void validate( char* toValidate ); 00142 bool validateChar( char toValidate ); 00143 00144 #pragma warning( pop ) 00145 }; 00146 00153 SWSERVICES_API bool operator==(const SWHandle &s1, const SWHandle &toCompare); 00155 SWSERVICES_API bool operator==(const SWHandle &s1, const CAtlString &toCompare); 00157 SWSERVICES_API bool operator==(const SWHandle &s1, const std::wstring &toCompare); 00159 SWSERVICES_API bool operator==(const SWHandle &s1, const wchar_t *toCompare); 00161 SWSERVICES_API bool operator==(const SWHandle &s1, const char *toCompare); 00163 SWSERVICES_API bool operator!=(const SWHandle &s1, const SWHandle &toCompare); 00165 SWSERVICES_API bool operator!=(const SWHandle &s1, const CAtlString &toCompare); 00167 SWSERVICES_API bool operator!=(const SWHandle &s1, const std::wstring &toCompare); 00169 SWSERVICES_API bool operator!=(const SWHandle &s1, const wchar_t *toCompare); 00171 SWSERVICES_API bool operator!=(const SWHandle &s1, const char *toCompare); 00173 SWSERVICES_API bool operator<(const SWHandle &s1, const SWHandle &toCompare); 00175 SWSERVICES_API bool operator<(const SWHandle &s1, const CAtlString &toCompare); 00177 SWSERVICES_API bool operator<(const SWHandle &s1, const std::wstring &toCompare); 00179 SWSERVICES_API bool operator<(const SWHandle &s1, const wchar_t *toCompare); 00181 SWSERVICES_API bool operator<(const SWHandle &s1, const char *toCompare); 00183 SWSERVICES_API bool operator<=(const SWHandle &s1, const SWHandle &toCompare); 00185 SWSERVICES_API bool operator<=(const SWHandle &s1, const CAtlString &toCompare); 00187 SWSERVICES_API bool operator<=(const SWHandle &s1, const std::wstring &toCompare); 00189 SWSERVICES_API bool operator<=(const SWHandle &s1, const wchar_t *toCompare); 00191 SWSERVICES_API bool operator<=(const SWHandle &s1, const char *toCompare); 00193 SWSERVICES_API bool operator>(const SWHandle &s1, const SWHandle &toCompare); 00195 SWSERVICES_API bool operator>(const SWHandle &s1, const CAtlString &toCompare); 00197 SWSERVICES_API bool operator>(const SWHandle &s1, const std::wstring &toCompare); 00199 SWSERVICES_API bool operator>(const SWHandle &s1, const wchar_t *toCompare); 00201 SWSERVICES_API bool operator>(const SWHandle &s1, const char *toCompare); 00203 SWSERVICES_API bool operator>=(const SWHandle &s1, const SWHandle &toCompare); 00205 SWSERVICES_API bool operator>=(const SWHandle &s1, const CAtlString &toCompare); 00207 SWSERVICES_API bool operator>=(const SWHandle &s1, const std::wstring &toCompare); 00209 SWSERVICES_API bool operator>=(const SWHandle &s1, const wchar_t *toCompare); 00211 SWSERVICES_API bool operator>=(const SWHandle &s1, const char *toCompare); 00213 00219 SWSERVICES_API std::ostream& operator<< ( std::ostream& os, SWHandle& handle ); 00221 SWSERVICES_API std::stringstream& operator<< ( std::stringstream& os, SWHandle& handle ); 00223 SWSERVICES_API std::wstringstream& operator<< ( std::wstringstream& os, SWHandle& handle ); 00225 00226 #endif // !defined(AFX_SWHANDLE_H__BD650303_DA57_11D3_89EF_0040333C2E7E__INCLUDED_)


Copyright (c) 2003-2004, Deep Fried Software. All rights reserved.